<?php
namespace app\index\controller;

use anerg\Alidayu\SmsGateWay;

class Index
{
    public function index()
    {
        $code = mt_rand(1000, 9999); 

        $AliSMS = new SmsGateWay(); 
        //send方法三个参数分别为：手机号，变量参数，模板编号 
        $AliSMS->send($mobile, ['code'=>$code], 'SMS_10210103'); 

        
    }
}
